#!/usr/bin/env python
# -*- coding: UTF-8 -*-
# @Project : chat_model 
# @File    : dialogue_schema.py
# @IDE     : PyCharm 
# @Author  :ZH
# @Time    : 2025/1/3 18:15
from typing import List, Optional

from pydantic import Field, BaseModel
from datetime import datetime

from apps.utils.enumerate import StateEnum


class BaseDialogueSchema(BaseModel):
    session_id: int = Field(description='会话id', title='session_id')
    query: str = Field(description='问题', title='query')
    answer: str = Field(description='回答', title='answer')
    model_id: int = Field(description='模型id', title='model_id')
    model_name: str = Field(description='模型名称', title='model_name')
    tool: List[dict] = Field(description='工具', title='tool')
    usage_tokens: int = Field(description='使用token', title='usage_tokens')


class CreateDialogueSchema(BaseModel):
    __doc__ = "创建历史记录信息模式"


class UpdateDialogueSchema(BaseModel):
    __doc__ = "更新历史记录信息模式"

